#ifndef __DALELIB_RENDERBUFFER_H__
#define __DALELIB_RENDERBUFFER_H__

//#include <GL/glew.h>
//#include "glee.h"
//#include <GL/gl.h>

class RenderBuffer
{
	GLuint _handle;
	GLenum _target;
	
public:

	RenderBuffer(GLenum _Target=GL_RENDERBUFFER_EXT)
		: _target(_Target)
	{ 
		glGenRenderbuffersEXT(1, &_handle);
	}

	~RenderBuffer() 
	{ 
		glDeleteRenderbuffersEXT(1, &_handle);
	}

	const GLuint getHandle() const { return _handle; }

	void bind()
	{
		glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, _handle);
	}

	void unbind()
	{
		glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
	}


};

#endif
